# coding = utf-8

import re

# res = re.match("zhang", "zhang123xinzhe")
# print(res.group())
#
# res1 = re.match("zhang\d", "zhang123xinzhe")
# print(res1.group())
#
# res2 = re.match("zhang\d+", "zhang1234567890xinzhe")
# print(res2.group())
#
# res3 = re.match("^.+", "zhang1234567890xinzhe")
# print(res3.group())
#
# res4 = re.match("^.", "zhang1234567890xinzhe")
# print(res4.group())
#
# res5 = re.match(".+", "zhang1234567890xinzhe")
# print(res5.group())

res6 = re.search("x[a-z]+\d+{e}", "zhang1234567890xinzhe123exinzhe123wxinzhe123c")
print(res6)

res7 = re.findall("ab*", "cabb3abcbbac")
res8 = re.findall("ab+", "cabb3abcbbac")

print(res7, res8)

res9 = re.sub("[0-9]+", "!", "ab12c313vmnjj1kkda44")
print(res9)



